package 建造者模式;

public class Director {
    private Builder builder;

    public void setBuilder(Builder builder) {
        this.builder = builder;
    }

    /*
            拿着Builder，这个产品：方法的顺序都一样
            有的产品，就是靠着制作顺序不一样区分开
         */
    public House constructHouse(){
        builder.buildBasis();
        builder.buildWall();
        builder.buildRoofed();
        return builder.returHouse();
    }

}
